<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
		<script type="text/javascript">
			var date1 = new Date();
			// 1566199977780 从1970年1月1号零点到现在的毫秒数
			console.log(date1.getTime())// 1566199977780
			console.log(date1);//Mon Aug 19 2019 15:34:45 GMT+0800
			var date2 = new Date("2013/3/20 11:30");
			console.log(date2);//Wed Mar 20 2013 11:30:00 GMT+0800
			var year = date1.getFullYear();
			console.log(year);// 2019
			var month = date1.getMonth();
			console.log(month);// 7
			var day = date1.getDate();
			console.log(day)// 19
			console.log(year + "年" + (month + 1) + "月" + day + "日")
			
			console.log(date1.toLocaleDateString());// 2019/8/19
			console.log(date1.toLocaleTimeString());// 下午3:40:57
		</script>
	</head>
	<body>
	</body>
</html>
